import React from "react";
import ReactDOM from "react-dom";
import classes from "./Backdrop.module.css";

const BackdropRoot = document.getElementById("backdrop-root");

function Backdrop(props) {
  return ReactDOM.createPortal(
    <div 
    {...props}
    className={`${classes.Backdrop} ${props.className}`} >
      {props.children}
    </div>,
    BackdropRoot
  );
}

export default Backdrop;
